package com.jintian.smart.kernel.switching.entity;

import lombok.Data;
import org.beetl.sql.annotation.entity.AssignID;
import org.beetl.sql.annotation.entity.Column;
import org.beetl.sql.annotation.entity.Table;

import java.time.LocalDateTime;

@Data
@Table(name = "mda_etl_loadjob", comment = "交换加载任务表")
public class ETLLoadJob {
    public enum Status {
        waiting, error, succeed, finish;
    }

    /**
     * 任务ID
     */
    @AssignID("snowid")
    private String id;
    /**
     * 任务状态
     */
    private String status;
    /**
     * 创建时间
     */
    @Column(name = "createTime")
    private LocalDateTime createTime;
    /**
     * 执行时间
     */
    @Column(name = "executeTime")
    private LocalDateTime executeTime;

    @Column(name = "dataType")
    private String dataType;

    /**
     * 规则，相同规则的任务顺序执行
     */
    @Column(name = "ruleName")
    private String ruleName;

    /**
     * 输入资源
     */
    @Column(name = "inputResource")
    private String inputResource;

    private String exception;

    private Integer retries;

}
